Optimal. Leaf size=224 \[ \frac {2 \left (a^2 B-b^2 B+2 a b (A-C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 \left (6 a b B+b^2 (3 A+C)+a^2 (A+3 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 b (3 b B-2 a (A-3 C)) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}-\frac {2 b^2 (A-C) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.35, antiderivative size = 224, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {4179, 4161,
4132, 3856, 2720, 4131, 2719} \begin {gather*} \frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (a^2 (A+3 C)+6 a b B+b^2 (3 A+C)\right )}{3 d}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (a^2 B+2 a b (A-C)-b^2 B\right )}{d}+\frac {2 b \sin (c+d x) \sqrt {\sec (c+d x)} (3 b B-2 a (A-3 C))}{3 d}+\frac {2 A \sin (c+d x) (a+b \sec (c+d x))^2}{3 d \sqrt {\sec (c+d x)}}-\frac {2 b^2 (A-C) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 3856
Rule 4131
Rule 4132
Rule 4161
Rule 4179
Rubi steps
\begin {align*} \int \frac {(a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {3}{2}}(c+d x)} \, dx &=\frac {2 A (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {2}{3} \int \frac {(a+b \sec (c+d x)) \left (\frac {1}{2} (4 A b+3 a B)+\frac {1}{2} (3 b B+a (A+3 C)) \sec (c+d x)-\frac {3}{2} b (A-C) \sec ^2(c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=-\frac {2 b^2 (A-C) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {4}{9} \int \frac {\frac {3}{4} a (4 A b+3 a B)+\frac {3}{4} \left (6 a b B+b^2 (3 A+C)+a^2 (A+3 C)\right ) \sec (c+d x)-\frac {3}{4} b (2 a A-3 b B-6 a C) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)}} \, dx\\ &=-\frac {2 b^2 (A-C) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {4}{9} \int \frac {\frac {3}{4} a (4 A b+3 a B)-\frac {3}{4} b (2 a A-3 b B-6 a C) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (6 a b B+b^2 (3 A+C)+a^2 (A+3 C)\right ) \int \sqrt {\sec (c+d x)} \, dx\\ &=-\frac {2 b (2 a A-3 b B-6 a C) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}-\frac {2 b^2 (A-C) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\left (a^2 B-b^2 B+2 a b (A-C)\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (\left (6 a b B+b^2 (3 A+C)+a^2 (A+3 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 \left (6 a b B+b^2 (3 A+C)+a^2 (A+3 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}-\frac {2 b (2 a A-3 b B-6 a C) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}-\frac {2 b^2 (A-C) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\left (\left (a^2 B-b^2 B+2 a b (A-C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=\frac {2 \left (a^2 B-b^2 B+2 a b (A-C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 \left (6 a b B+b^2 (3 A+C)+a^2 (A+3 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}-\frac {2 b (2 a A-3 b B-6 a C) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}-\frac {2 b^2 (A-C) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2 A (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.90, size = 227, normalized size = 1.01 \begin {gather*} \frac {2 (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (6 \left (a^2 B-b^2 B+2 a b (A-C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+2 \left (6 a b B+b^2 (3 A+C)+a^2 (A+3 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )+6 b^2 B \sin (c+d x)+12 a b C \sin (c+d x)+a^2 A \sin (2 (c+d x))+2 b^2 C \tan (c+d x)\right )}{3 d (b+a \cos (c+d x))^2 (A+2 C+2 B \cos (c+d x)+A \cos (2 (c+d x))) \sec ^{\frac {7}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1302\) vs.
\(2(254)=508\).
time = 0.18, size = 1303, normalized size = 5.82
method | result | size |
default | \(\text {Expression too large to display}\) | \(1303\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.29, size = 284, normalized size = 1.27 \begin {gather*} \frac {\sqrt {2} {\left (-i \, {\left (A + 3 \, C\right )} a^{2} - 6 i \, B a b - i \, {\left (3 \, A + C\right )} b^{2}\right )} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + \sqrt {2} {\left (i \, {\left (A + 3 \, C\right )} a^{2} + 6 i \, B a b + i \, {\left (3 \, A + C\right )} b^{2}\right )} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 \, \sqrt {2} {\left (-i \, B a^{2} - 2 i \, {\left (A - C\right )} a b + i \, B b^{2}\right )} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 \, \sqrt {2} {\left (i \, B a^{2} + 2 i \, {\left (A - C\right )} a b - i \, B b^{2}\right )} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + \frac {2 \, {\left (A a^{2} \cos \left (d x + c\right )^{2} + C b^{2} + 3 \, {\left (2 \, C a b + B b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{3 \, d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \sec {\left (c + d x \right )}\right )^{2} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right )}{\sec ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^2\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________